/*
 * basic thread api demo
 */
#include <stdio.h>
#include <stdlib.h>
#include <pthread.h>

static void *threadFunc(void *args)
{
    printf("thread\n");
    return NULL;
}

int main()
{
    pthread_t t1;
    int s;
    s = pthread_create(&t1, NULL, threadFunc, NULL);
    if (s != 0)
    {
        perror("pthread create\n");
        exit(1);
    }

    printf("message from main\n");
    s = pthread_join(t1, NULL);
    printf("main exit\n");
    return 0;
}